package life.majiang.community.service;

import life.majiang.community.mapper.LikeCountMapper;
import life.majiang.community.model.CommentLikeCount;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LikeCountService {
    @Autowired
    private LikeCountMapper likeCountMapper;

    public List<CommentLikeCount> getCommentLikeCountDTOListByUserIdAndQuestionId(Long userId, Long questionId){
        return likeCountMapper.getCommentLikeCountDTOListByUserIdAndQuestionId(userId, questionId);
    }

    public boolean removeLikeCountByQuestionId(Long questionId){
        return likeCountMapper.removeLikeCountByQuestionId(questionId);
    }

    public boolean removeLikeCountByCommentId(Long commentId){
        return likeCountMapper.removeLikeCountByCommentId(commentId);
    }
}
